-- GENERATED SPELL FOR [Scarlet Vanguard] --


function spell0_1540(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_1540', 627, 1)
end

function spell1_1540(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(72,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1540', 6000, 1)
end

function Sorts_1540(pUnit, Event)
local choix_sorts_1540 = math.random(0, 1)
if choix_sorts_1540 == 0 then
pUnit:RegisterEvent('spell0_1540', 1, 1)
end
if choix_sorts_1540 == 1 then
pUnit:RegisterEvent('spell1_1540', 1, 1)
end
end

function mob1540_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1540', math.random(1500, 3000), 1)
end

function mob1540_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1540_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1540_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1540, 1, 'mob1540_Action')
RegisterUnitEvent(1540, 2, 'mob1540_Leave')
RegisterUnitEvent(1540, 3, 'mob1540_Kill')
RegisterUnitEvent(1540, 4, 'mob1540_Die')
